package com.bw.server.api

import com.bw.http.http.okhttp.HttpRetrofitAnnotation
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Singleton

/**
 * 服务hilt模块
 */

@Module //声明当前是一个Hilt模块
@InstallIn(SingletonComponent::class) // 声明当前类的作用域是整个应用
object ServerHiltModel {

    @Provides
    @Singleton
    fun getServerApiServiceModel(@HttpRetrofitAnnotation retrofit: Retrofit):ServerApiService {
        return retrofit.create(ServerApiService::class.java)
    }


}